package com.zdxlz.fcmp.common.core.constant;

import java.util.List;

public interface CommonConstants {

    /**
     * 成功标记
     */
    Integer SUCCESS = 0;

    /**
     * 失败标记
     */
    Integer FAIL = 1;

    String DEFAULT_PASSWORD = "Abcd1234";
    String AUTH_FIELD = "Authorization";
    String AUTH_TOKEN_STRAT = "Bearer ";
    String ICT_HEADER_APPID = "appId";
    String ICT_HEADER_TIMESTAMP = "timestamp";
    String ICT_HEADER_SIGNATURE = "signature";
    String ACCESS_TOKEN = "accessToken";
    String REFRESH_TOKEN = "refreshToken";
    String ACCESS_TOKEN_EXPIRATION = "expiration";
    String HMAC_SHA256_ALGORITHM = "HmacSHA256";
    String VERSION = "version";
    String LOGIN_SUCCESS = "登陆成功！";
    String OPERATION_SUCCESS = "操作成功！";
    String CREATE_SUCCESS = "创建成功！";
    String UPDATE_SUCCESS = "更新成功！";
    String UPDATE_PASSWORD_SUCCESS = "重置密码成功！";
    String DELETE_SUCCESS = "删除成功！";
    String OPERATION_FAILED = "操作失败！";

    // 枚举静态方法名
    String ENUM_STATIC_METHOD_NAME = "getByCode";
    // 参数后缀
    String PARAMETER_SUFFIX = "Dto";
    // GET请求，枚举参数需要做 转换 的字段
    List<String> ENUM_CONVERSION_FIELD_LIST = List.of("opFlag", "userType", "productType", "type", "ipsecType", "encapsulationMode", "ikeVerifyMethod", "ikeVerifyAlgorithm",
                                                      "ikeEncryptAlgorithm", "ikedhGroup", "ipsecAuthAlgorithm", "ipsecEncryptAlgorithm", "ipsecPfs", "ahAuthAlgorithm",
                                                      "ipsecTransform", "dpdEnable", "logType");
    String REQ_STATUS_true = "true";
    String REQ_STATUS_false = "false";
    List<String> REQ_BOOLEAN_FIELD = List.of("status");

    String STRING_ZERO = "0";
    String ANY_ADDRESS = "0.0.0.0";
    String PERMISSION_PREFIX = "perm:";

    String ID = "id";
    String USER_ID = "user_id";
    String ROLE_ID = "role_id";
    String MENU_ID = "menu_id";
    String TENANT_NAME = "tenantName";
    String STATUS = "status";
    String USER_TYPE = "user_type";
    String OLD_PASSWORD = "oldPassword";
    String NEW_PASSWORD = "newPassword";
    String CONFIRM_PASSWORD = "confirmPassword";
    String ROLE_NAME = "roleName";

    Integer INTEGER_0 = 0;
    Integer INTEGER_1 = 1;

    Integer INTEGER_3 = 3;
    Integer INTEGER_5 = 5;
    Integer INTEGER_200 = 200;
    Integer INTEGER_65535 = 65535;

    String SEPARATOR = ",";
    String UNKNOWN = "unknown";
    String LOCALHOST_IP = "127.0.0.1";

    // 客户端与服务器同为一台机器，获取的 ip 有时候是 ipv6 格式
    String LOCALHOST_IPV6 = "0:0:0:0:0:0:0:1";
    String CTL_CENTER_REQ_HEADER_KEY = "sign";
}
